But when I add it to setupVars.conf and perform unattended install, then I can't login to web interface, getting 'Wrong password' message... Do I miss anything?
If I miss some of the variables in the conf file, will pihole replace them by default values during unattended installation? (It is the behavior of pivpn.)
Thanks!
I use my own web server, so I chose to not install lighttp, but want to have the web interface scripts. This example uses Google DNS for both IPv4 and IPv6 name resolution.
Together with an adlists.list the complete setup of a pihole can be automated and used with the --unattended option.
I'm still not sure if this includes all possible options. E.g. I don't use DHCP. I'd expect some variables for it too. But it works for me and if the SD card dies, the pihole runs again in 10 mins.
You are replying to a very old FAQ. Much has changed in Pi-hole since June '17. New configuration options, etc.
And, each user will have different entries in their own file, based on the options they are using in Pi-hole. My config file looks quite different than yours, as one example.
The bottom line - setupVars.conf is typically controlled by Pi-hole, and the best way to populate it is with
pihole -r and the reconfigure option
and by changing options in the web admin GUI (DHCP, logging, DNSSEC, forwarding, DNS servers, etc.)